@extends('layouts.layouts')
@section('title')
    <title>后台首页</title>
@endsection
@section('content')
    <link rel="stylesheet" href="/lib/layer/theme/default/layer.css"/>
    <script type="text/javascript" src="/lib/layer/layer.js"></script>
    <div class="content">
        <div class="header">
            <ul class="breadcrumb">
                <li><a href="/wechat/menu">菜单栏管理</a></li>
                <li class="active">菜单列表</li>
            </ul>
        </div>
        <div class="main-content">
            <div class="btn-toolbar list-toolbar">

                <form class="form-inline" action="" method="get">
                @if($count < 3)
                    <a href="/wechat/menuAdd"><button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" ><i class="fa fa-plus"></i> 新增</button></a>
                @else
                    <a><button type="button"  disabled class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" ><i class="fa fa-plus"></i> 新增</button></a>
                @endif
                   <!-- <div class="form-group">
                        <input type="text" class="form-control" name="title" placeholder="课程标题" value="">
                    </div>
                    <button type="submit" class="btn btn-default">筛选</button>-->
                </form>
            </div>
            <div class="row">
                <div class="col-sm-12 col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-heading no-collapse">课程列表</div>
                        <table class="table table-bordered table-striped">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>内容</th>
                                <th>编辑时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach($list as $v)
                               <tr  class="panel-group">
                                    <th>{{$v->id}}</th>
                                    <th>{{$v->name}}</th>
                                   
                                    <th>{{$v->updated_at}}</th>
                                    <th>
                                        <a href="/wechat/menuUpdate?id={{$v->id}}"><i class="fa fa-pencil"></i>编辑</a>&nbsp;|
                                        <a href="/wechat/menuDelete?id={{$v->id}}" role="button" data-toggle="modal"><i class="fa fa-trash-o"></i>删除</a>
                                    </th>
                                </tr>
                            @endforeach
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
       
     <a href="/wechat/generate"><button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" ><i class="fa fa-plus"></i> 生成菜单栏</button></a>   
        </div>
    </div>
    <script type="text/javascript">
        
    </script>
@endsection